<script setup lang="ts">
import {commonFormat} from "@/utils/format-table";
import {useMoneyStore} from "@/store/views/sys/dnf/money";

const moneyStore = useMoneyStore()
const {getList} = moneyStore
const {data, dnfPriceTypeOptions} = storeToRefs(moneyStore)

onMounted(() => {
  getList()
})
</script>

<template>
  <div class="flex gap-8">
    <template v-if="dnfPriceTypeOptions">
      <div class="flex flex-col" v-for="item in data" :key="item.id">
        <el-text class="flex-self-inherit!">{{ commonFormat(item.priceType, dnfPriceTypeOptions) }}</el-text>
        <x-count-to :value="item.num"/>
      </div>
    </template>
    <template v-else>
      loading...
    </template>
  </div>
</template>

<style scoped lang="scss">

</style>